a11y: Add role exception for GtkScrolledWindow
authorEmmanuele Bassi <ebassi@gnome.org>
Thu, 12 Nov 2020 14:37:21 +0000 (14:37 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Thu, 12 Nov 2020 21:46:05 +0000 (21:46 +0000)
ARIA does not have a "scroll pane" role, but AT-SPI does.

gtk/a11y/gtkatspiutils.c

index 87b1887fe8629f75a1ed7a3553f238f3251d3845..9210d3754e2943ee8366a485451c3b898a2aeea7 100644 (file)
 #include "config.h"
 
 #include "gtkatspiutilsprivate.h"
+
 #include "gtkenums.h"
 #include "gtkpasswordentry.h"
+#include "gtkscrolledwindow.h"
 
 /*< private >
  * gtk_accessible_role_to_atspi_role:
@@ -298,6 +300,10 @@ gtk_atspi_role_for_context (GtkATContext *context)
   if (GTK_IS_PASSWORD_ENTRY (accessible))
     return ATSPI_ROLE_PASSWORD_TEXT;
 
+  /* ARIA does not have a "scroll area" role */
+  if (GTK_IS_SCROLLED_WINDOW (accessible))
+    return ATSPI_ROLE_SCROLL_PANE;
+
   return gtk_accessible_role_to_atspi_role (role);
 }